package com.code.day13;

import java.util.Scanner;

public class Day13StringBuilderLianXi {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        System.out.println("请输出字符串:");
        String str = sc.next();
        sb.append(str);
        System.out.println(str);
        System.out.println(sb.reverse());
        if (str.equals(sb.reverse().toString())) {
            System.out.println("是回文");
        } else {
            System.out.println("不是回文");
        }

    }
}
